import 'package:flutter/material.dart';
import 'package:flutterdemo/0demo/ui/custom_charts/custom_chart_test.dart';
import 'package:flutterdemo/0demo/ui/custom_charts/custom_charts.dart';

class CustomChatsTestPage extends StatefulWidget {
  @override
  _CustomChatsTestPageState createState() => _CustomChatsTestPageState();
}

class _CustomChatsTestPageState extends State<CustomChatsTestPage> {
  bool show2 = true;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("custom charts"),
      ),
      body: Column(
        children: [
          CustomChartTest(show2: show2),
          SizedBox(height: 20),
          Row(
            children: [
              TextButton(
                onPressed: () {
                  setState(() {
                    show2 = !show2;
                  });
                },
                child: Text("111"),
              ),
              TextButton(
                onPressed: () {
                  setState(() {
                    show2 = !show2;
                  });
                },
                child: Text("222"),
              ),
            ],
          ),
          SizedBox(height: 20),
          CustomCharts(),
        ],
      ),
    );
  }
}
